﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using IStrong.EC.Abstractions.Interfaces;
using IStrong.EC.DAO.Abstractions.Interfaces;
using IStrong.EC.WebApi.Results.Entity;
using IStrong.EC.WebApi.Results.Entity.Channel;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;

namespace IStrong.EC.WebApi.Results.Repository
{
    public class ChannelimportanceRepository : IService
    {
        /// <summary>
        /// 数据库操作组件
        /// </summary>
        private readonly IDbContext _db;

        /// <summary>
        /// 配置信息
        /// </summary>
        private readonly IConfiguration _configuration;

        /// <summary>
        /// 日志组件
        /// </summary>
        private readonly ILogger<ChannelRepository> _logger;

        public ChannelimportanceRepository(IDbContext db, ILogger<ChannelRepository> logger, IConfiguration configuration)
        {
            _db = db;
            _logger = logger;
            _configuration = configuration;
        }

        public IEnumerable<Channelimportance> GetImportanceById(object param)
        {
            return _db.Query<Channelimportance>("Channelimportance.s_channelimportanceid", param);
        }
    }
}
